package homework;

import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入利润:");
        double profit = sc.nextDouble(); //利润
        double bonus = 0;  //奖金
        if (profit>=0){
            if (profit<=100000){
                bonus = profit*0.1;
            }else if (profit<200000){
                bonus = (profit-100000)*0.075+10000;
            }else if (profit<400000){
                bonus = 100000*0.075+10000+(profit-200000)*0.05;
            } else if (profit<600000) {
                bonus = (profit-400000)*0.03+100000*0.075+10000+10000;
            }else if (profit<1000000){
                bonus = 100000*0.075+10000+10000+6000+(profit-600000)*0.015;
            }else {
                bonus = 100000*0.075+10000+10000+6000+(profit-1000000)*0.01;
            }
            System.out.println("奖金为："+bonus);
        }
    }
}
